import { baseUrl1 } from './defaultUrl.js'


export default function request(url, data = {}, method = 'GET') {
  return new Promise((resolve, reject) => {
    uni.request({
      url: baseUrl1 + url,
      data,
      header: { 'X-Client-Info': '{"a":"3000","ch":"1002","v":"5.0.4","e":"15984753841366499679797249","bc":"310100"}', 'X-Host': 'mall.film-ticket.city.list' },
      timeout: 10000,
      dataType: 'json',
      success: res => {
        resolve(res.data)
      },
      fail: err => {
        reject(err)
      }
    })
  })
}
